package cn.wei.youvie.service;

import cn.wei.youvie.common.servlet.DeleteRequest;
import cn.wei.youvie.domain.dto.chapter.ChapterAddRequest;
import cn.wei.youvie.domain.dto.chapter.ChapterQueryRequest;
import cn.wei.youvie.domain.dto.chapter.ChapterUpdateRequest;
import cn.wei.youvie.domain.entity.Chapter;
import cn.wei.youvie.domain.vo.ChapterVO;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.servlet.http.HttpServletRequest;

/**
* @author Youvie
* @description 针对表【chapters(存储书籍中的章节信息)】的数据库操作Service
* @createDate 2024-08-27 21:02:10
*/
public interface ChapterService extends IService<Chapter> {

    Integer add(ChapterAddRequest chapterAddRequest, HttpServletRequest request);

    boolean deleteChapter(DeleteRequest deleteRequest, HttpServletRequest request);

    boolean updateChapter(ChapterUpdateRequest chapterUpdateRequest);

    ChapterVO getChapterVO(Chapter chapter, HttpServletRequest request);

    Wrapper<Chapter> getQueryWrapper(ChapterQueryRequest chapterQueryRequest);

    Page<ChapterVO> getChapterVOPage(Page<Chapter> chapterPage, HttpServletRequest request);

    ChapterVO getContentsByChapterId(ChapterQueryRequest chapterQueryRequest, HttpServletRequest request);
}
